import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/Home'
import main from '@/components/Main'

import elementui from '@/components/elementui/Index'
import Selects from '@/components/elementui/forms/selects/index'
import Layouts from '@/components/elementui/bases/layouts/Index'
import Drawers from '@/components/elementui/others/drawers/Index'
import VueConfigs from '@/components/vue/configs/Index'
import product_table from '@/components/product/TestExtendTable'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
  //   {
  //   path: '/login',
  //   component: login,
  //   props: {isPage: true},
  // },
    {
    path: '/',
    redirect: '/home'
  }, {
    path: '/',
    component: main,
    children: [{
      path: '/home',
      component: home
    }, {
      path: '/product/table',
      component: product_table
    }, {
      path: '/elementui/bases/layouts/index',
      component: elementui,
      children: [{
        path: '/elementui/bases/layouts/index',
        component: Layouts
      }, {
        path: '/elementui/forms/selects/index',
        component: Selects
      }, {
        path: '/elementui/others/drawers/index',
        component: Drawers
      }]
    }, {
      path: '/vue/configs/index',
      component: VueConfigs,
      propsData: {height: 200}
    }]
  }]
})
